import Vue from "vue";
import VueRouter from "vue-router";
import MainView from "../views/MainView.vue";
const YearsArticle = () => import("@/views/YearsArticle.vue");
const ArticleList = () => import("@/views/ArticleList.vue");
const Article = () => import("@/views/Article.vue");
const VideoList = () => import("@/views/VideoList.vue");
const VideoTypeList = () => import("@/views/VideoTypeList.vue");
const YearArticleList = () => import("@/views/YearArticleList.vue");

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "index",
    component: MainView,
  },
  {
    path: "/videoTypes",
    name: "videoTypes",
    component: VideoTypeList,
  },
  {
    path: "/videoTypes/videos",
    name: "videoList",
    component: VideoList,
  },
  {
    path: "/articles",
    name: "articles",
    component: ArticleList,
  },
  {
    path: "/article",
    name: "articlePage",
    component: Article,
  },
  {
    path: "/yearsArticle",
    name: "yearsArticle",
    component: YearsArticle,
  },
  {
    path: "/yearArticleList",
    name: "yearArticleList",
    component: YearArticleList,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
